<template>
    <div>
        <table>
            <tr>
                <td>设备ID</td>
                <td>设备名称</td>
                <td>所属燃气库ID</td>
                <td>状态</td>
                <td>标志位</td>
                <td>创建时间</td>
                <td>创建人</td>
                <td>修改时间</td>
                <td>修改人</td>
            </tr>
            <tr v-for="facility in facilities">
                <td>{{facility.facId}}</td>
                <td>{{facility.facName}}</td>
                <td>{{facility.baseId}}</td>
                <td>{{facility.status}}</td>
                <td>{{facility.flag}}</td>
                <td>{{facility.createTime}}</td>
                <td>{{facility.createBy}}</td>
                <td>{{facility.modifyTime}}</td>
                <td>{{facility.modifyBy}}</td>
            </tr>
        </table>
        {{msg}}
    </div>
</template>

<script>
    export default {
        name: "Facility",
        data(){
            return {
                msg: 'hello vue',
                facilities: [
                    {
                        facId: "01",
                        facName: "ll",
                        baseId: "33",
                        status: 1,
                        flag: 1,
                        createTime: "2021-07-28",
                        createBy: "Li",
                        modifyTime: "2021-07-28",
                        modifyBy: "Li"
                    }
                ]
            }
        },
        created() {
            alert("Welcome")   //小弹窗
            const _this = this
            axios.get('http://localhost:8081/gas/facility/queryFacilityList').then(function (resp) {
                _this.facilities = resp.data
            })
        }
    }
</script>

<style scoped>

</style>